<?php
	session_start();
	
	if (isset($_GET['logout'])) {
		unset($_SESSION['username']);
		header('Location: index.php');
	}
	
	// code to check user logins, make sure only authorized people are actually logged in for every page
	if (isset($_GET['login'])){
		if ($_POST['username'] != "") {
			$_SESSION['username'] = $_POST['username'];
		}
	}
?>